package com.markyao.vo;

public class Result {
    private Boolean success;

    private int code;

    private String msg;

    private Object data;

    public Result(boolean b, int code, String msg, Object o) {
        this.success=b;
        this.code=code;
        this.msg=msg;
        this.data=o;
    }

    public static Result success(Object data){
        return new Result(true,200,"success",data);
    }

    public static Result failed(int code,String msg){
        return new Result(false,code,msg,null);
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}